
define(function (require, exports) {
  exports.ready = function (hashCode, data, cite) {
    yufp.custom.vue({
      el: cite.el,
      data: function () {
        return {
          urls: {
            dataUrl: backend.workflowService + '/api/metting/myOp'
          },
          requestType: 'GET',
          dataParams: {
            condition: JSON.stringify({
              instanceId: data.instanceId
            })
          },
          tableColumns: [
            { label: '流程实例号', prop: 'instanceId', resizable: true, align: 'center'},
            { label: '会议标题', prop: 'mettingSub', resizable: true, align: 'center'},
            { label: '会议年份', prop: 'mettingYear', resizable: true, align: 'center'},
            { label: '会议期号', prop: 'mettingNo', resizable: true, align: 'center'},
            { label: '投票人', prop: 'userId', resizable: true, align: 'center'},
            { label: '投票人姓名', prop: 'userName', resizable: true, align: 'center'},
            { label: '开始时间', prop: 'startTime', resizable: true, align: 'center'},
            { label: '结束时间', prop: 'endTime', resizable: true, align: 'center'},
            { label: '投票结果',
              prop: 'mettingSts',
              resizable: true,
              align: 'center',
              template: function () {
                return '<template scope="scope">\
                <span style="color:green;" v-if="scope.row.mettingSts==\'Y\'">同意</span>\
                <span style="color:red;" v-if="scope.row.mettingSts==\'N\'">否决</span>\
                <span style="color:orange;" v-if="scope.row.mettingSts==\'G\'">弃权</span>\
                <span style="color:#20A0FF;" v-if="scope.row.mettingSts==null">未投票</span>\
                </template>';
              }
            },
            { label: '会议意见', prop: 'mettingComment', resizable: true, align: 'center'}
          ]
        };
      },
      methods: {
      }
    });
  };

  exports.onmessage = function (type, message) {
  };
  exports.destroy = function (id, cite) {
  };
});